let diaglog = [];//对话
let friendshowList = [];//聊天列表
let friendAskList = [];//好友
//对话
function pushDialog(item){
	diaglog.push(item)
	
	// return diaglog
}
//对话
function getDialog(){
	console.log('对话')
	console.log(diaglog)
	return diaglog
}
//新朋友申请列表
function pushFriendAskList(item){
	friendAskList.unshift(item)
	console.log(friendAskList)
	saveStorage('friendAskList',friendAskList)
	return friendAskList
}
function getFriendAskList(){
	return getStorage('friendAskList')
}
//聊天列表
function pushfriendshowList(item){
	friendshowList.unshift(item)
	return friendshowList
}
function getfriendshowList(){
	return friendshowList
}
//所有聊天未读消息
function addallnoreadnum(){
	let allnoreadnum = 0;
	friendshowList.forEach((item,index)=>{
		console.log(item.noreadnum)
		allnoreadnum += parseInt(item.noreadnum);
	})
	saveStorage('allnoreadnumshow',allnoreadnum)
	console.log('娃哈哈')
	console.log(getStorage('allnoreadnumshow'))
	 webvue.allnoreadnumshow = allnoreadnum;
}
function getallnoreadnum(){
	console.log('维度的')
	console.log(allnoreadnum)
	return allnoreadnum
}
function reduceallnoreadnum(num){
	var old = getStorage('allnoreadnumshow') - parseInt(num);
	saveStorage('allnoreadnumshow',old)
	webvue.allnoreadnumshow = webvue.allnoreadnumshow - parseInt(num);
}
//新好友申请未读人数
function addnewfriendnum(){
	// webvue.newfriendnum++
	var num = getStorage('friendAskList').length;
	webvue.newfriendnum = num;
	saveStorage('newfriendnum',num)
	console.log('增加了：'+num)
}

// export  {friendAskList};